<template>
  <a-upload
    :showUploadList="false"
    accept=".xls,.xlsx"
    :customRequest="
      ({ file }) => {
        uploadExcel(file);
      }
    "
    :disabled="disabled"
  >
    <a-button type="link" :disabled="disabled">
      <upload-outlined></upload-outlined>
      上传
    </a-button>
  </a-upload>
</template>
<script setup>
const props = defineProps(["disabled"]);
const emits = defineEmits(["onFile"]);

const uploadExcel = (file) => {
  emits("onFile", file);
};
</script>
<style scoped lang="less"></style>
